package com.jast.business.service.impl;

import java.util.List;
import com.jast.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jast.business.mapper.BigdataZookeeperKvLineMapper;
import com.jast.business.domain.BigdataZookeeperKvLine;
import com.jast.business.service.IBigdataZookeeperKvLineService;
import com.jast.common.core.text.Convert;

/**
 * Zookeeper监控指标近3天指标Service业务层处理
 * 
 * @author Jast
 * @date 2023-02-16
 */
@Service
public class BigdataZookeeperKvLineServiceImpl implements IBigdataZookeeperKvLineService 
{
    @Autowired
    private BigdataZookeeperKvLineMapper bigdataZookeeperKvLineMapper;

    /**
     * 查询Zookeeper监控指标近3天指标
     * 
     * @param id Zookeeper监控指标近3天指标主键
     * @return Zookeeper监控指标近3天指标
     */
    @Override
    public BigdataZookeeperKvLine selectBigdataZookeeperKvLineById(Long id)
    {
        return bigdataZookeeperKvLineMapper.selectBigdataZookeeperKvLineById(id);
    }

    /**
     * 查询Zookeeper监控指标近3天指标列表
     * 
     * @param bigdataZookeeperKvLine Zookeeper监控指标近3天指标
     * @return Zookeeper监控指标近3天指标
     */
    @Override
    public List<BigdataZookeeperKvLine> selectBigdataZookeeperKvLineList(BigdataZookeeperKvLine bigdataZookeeperKvLine)
    {
        return bigdataZookeeperKvLineMapper.selectBigdataZookeeperKvLineList(bigdataZookeeperKvLine);
    }

    /**
     * 新增Zookeeper监控指标近3天指标
     * 
     * @param bigdataZookeeperKvLine Zookeeper监控指标近3天指标
     * @return 结果
     */
    @Override
    public int insertBigdataZookeeperKvLine(BigdataZookeeperKvLine bigdataZookeeperKvLine)
    {
        bigdataZookeeperKvLine.setCreateTime(DateUtils.getNowDate());
        return bigdataZookeeperKvLineMapper.insertBigdataZookeeperKvLine(bigdataZookeeperKvLine);
    }

    /**
     * 更新/新增Zookeeper监控指标近3天指标
     *
     * @param bigdataZookeeperKvLine Zookeeper监控指标近3天指标
     * @return 结果
     */
    @Override
    public int upsertBigdataZookeeperKvLine(BigdataZookeeperKvLine bigdataZookeeperKvLine)
    {
                bigdataZookeeperKvLine.setUpdateTime(DateUtils.getNowDate());
            return bigdataZookeeperKvLineMapper.upsertBigdataZookeeperKvLine(bigdataZookeeperKvLine);
    }

    /**
     * 修改Zookeeper监控指标近3天指标
     * 
     * @param bigdataZookeeperKvLine Zookeeper监控指标近3天指标
     * @return 结果
     */
    @Override
    public int updateBigdataZookeeperKvLine(BigdataZookeeperKvLine bigdataZookeeperKvLine)
    {
        bigdataZookeeperKvLine.setUpdateTime(DateUtils.getNowDate());
        return bigdataZookeeperKvLineMapper.updateBigdataZookeeperKvLine(bigdataZookeeperKvLine);
    }

    /**
     * 批量删除Zookeeper监控指标近3天指标
     * 
     * @param ids 需要删除的Zookeeper监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataZookeeperKvLineByIds(String ids)
    {
        return bigdataZookeeperKvLineMapper.deleteBigdataZookeeperKvLineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除Zookeeper监控指标近3天指标信息
     * 
     * @param id Zookeeper监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataZookeeperKvLineById(Long id)
    {
        return bigdataZookeeperKvLineMapper.deleteBigdataZookeeperKvLineById(id);
    }
}
